package org.jeecg.modules.scm.api.fallback;

import feign.hystrix.FallbackFactory;
import org.jeecg.modules.scm.api.ScmCommonCloudApi;
import org.springframework.stereotype.Component;

@Component
public class ScmCommonCloudApiFallbackFactory implements FallbackFactory<ScmCommonCloudApi> {
    @Override
    public ScmCommonCloudApi create(Throwable throwable) {
        ScmCommonCloudApiFallback commonCloudApiFallback = new ScmCommonCloudApiFallback();
        commonCloudApiFallback.setCause(throwable);
        return commonCloudApiFallback;
    }
}
